Introduction

As with any coding project, you need to upload your work to a GitHub repository to facilitate collaboration and access different versions as needed. You also need to clone the GitHub repository to your machine and push your code at the end of each exercise in this course.

Scenario

Before you get started on the Little Lemon food ordering app, you need to establish a place where you can collaborate with the Little Lemon restaurant owners. In other words, a place where you can monitor the version control of the ongoing revisions of the website.

In this exercise, you will create a repository on GitHub, clone it to a local repository, add a test file and commit the changes.

Instructions

To complete this exercise successfully, ensure that you’ve downloaded and installed Git for your operating system. For assistance, please refer to the Version control recap video.

Step 1

Log into GitHub (create an account if necessary) and create a new repository. Name your repository littlelemon .

Step 2

Open the Git terminal on your machine.

Step 3

Copy the URL for your newly-created GitHub repository that you will find on Github repository page

Step 4

Create a local folder for the repository on your computer.

Step 5

Using the terminal, navigate to the created local folder using the cd command.

Step 6

Clone the repository by using the URL of the repository and git clone command.

Step 7

Enter the repository folder using the terminal and check the list of files using the git status command. By this point, it should not have any new changes.

Conclusion

Congratulations, you have successfully set up a new git repository and made it ready for the new Swift project that you will be creating in the following exercises.